package com.cq.hd.system.api;

import com.cq.hd.common.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "hd-o2o-system-service", contextId = "oss-api")
public interface OssApi {

    // 上传图片
    @PostMapping(value = "/system/oss/uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    Result<String> uploadFile(@RequestPart("file") MultipartFile file, @RequestParam("uploadPath") String uploadPath, @RequestParam("fileName") String fileName);

}
